<?php

if(isset($_GET['key']) && isset($_GET['value']))
{
	if( $bean = ConfirmRequestManager::GetRequest('http://sociorating.com/confirmemail', $_GET['key'], $_GET['value']) )
	{
		$user = $bean->param1;
		$email = $bean->param2;
		if(UserManager::ConfirmEmail($user, $email))
			print 'Email address confirmed!';
		else
			print 'Email address has changed. Please confirm your new email address.';
		R::trash($bean);
	}
	else
		print 'There was an error in handling the confirmation request.';
}
else
	print 'There was an error in handling the confirmation request.';
